<template>
	<view class="p-20">
		
		<view class="detail_outer">
			<view class="detail_tit">
				佣金详情
			</view>
			<view class="detail_content">
				<view class="detail_line FlexBetween"
				v-for="(item, index) in infolist"
				>
					<view class="tit">
						{{item.title}}
					</view>
					<view class="value">
						{{item.value}}
					</view>
				</view>
				
			</view>
		</view>
		
	</view>
</template>

<script>
	import {
		usersBildetail,
	} from "@/api/user";
	export default {
		components: {
			
		},
		data() {
			return {
				cid: '',
				infolist: [],
			}
		},
		onLoad(options){
			console.log('options', options)
			this.cid = options.id
			if(this.cid){
				this.getDetail()
			}
			
		},
		methods: {
			getDetail(){
				usersBildetail({id: this.cid}).then(res=>{
					console.log('sdfsd', res)
					this.setDetailInfo(res)
				})
			},
			setDetailInfo(res){
				     
				this.infolist = [
					{
						title: '用户编号',
						value: res.user_sn,
					},
					{
						title: '用户昵称',
						value: res.nickname,
					},
					{
						title: '手机号码',
						value: res.mobile,
					},
					{
						title: '变动金额',
						value: res.change_amount_desc,
					},
					{
						title: '剩余金额',
						value: '￥' + res.left_amount,
					},
					{
						title: '变动类型',
						value: res.type_desc,
					},
					{
						title: '订单编号',
						value: res.association_sn,
					},
					{
						title: '记录时间',
						value: res.create_time,
					},
				]
			},
		},
		
	}
</script>

<style lang="scss" scoped>
	@import "@/bundle4/css/Flex.scss";
	.detail_outer {
		width: 100%;
		padding: 35rpx;
		background: #fff;
		border-radius: 14rpx;
		.detail_tit{
			font-size: 32rpx;
			font-weight: 550;
			color: rgba(22, 22, 22, 1);
			border-bottom: solid 1px #F1F1F1;
			padding-bottom: 20rpx;
			width: 100%;
			margin-bottom: 40rpx;
		}
		.detail_content{
			width: 100%;
			.detail_line{
				width: 100%;
				margin-bottom: 40rpx;
				.tit{
				
					font-size: 28rpx;
					font-weight: 400;
					color: rgba(146, 146, 146, 1);

				}
				.value{
					max-width: 400rpx;
					font-size: 28rpx;
					font-weight: 400;
					color: rgba(22, 22, 22, 1);
					text-align: right;
				}
			}
		}
	}
	
</style>